home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / mig / dist / utils.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-27  |  3.5 KB  |  99 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1991,1990 Carnegie Mellon University
  4.  * All Rights Reserved.
  5.  * 
  6.  * Permission to use, copy, modify and distribute this software and its
  7.  * documentation is hereby granted, provided that both the copyright
  8.  * notice and this permission notice appear in all copies of the
  9.  * software, derivative works or modified versions, and any portions
  10.  * thereof, and that both notices appear in supporting documentation.
  11.  * 
  12.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS 
  13.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  14.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  15.  * 
  16.  * Carnegie Mellon requests users of this software to return to
  17.  * 
  18.  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  19.  *  School of Computer Science
  20.  *  Carnegie Mellon University
  21.  *  Pittsburgh PA 15213-3890
  22.  * 
  23.  * any improvements or extensions that they make and grant Carnegie the
  24.  * rights to redistribute these changes.
  25.  */
  26. /*
  27.  * HISTORY
  28.  * $Log:    utils.h,v $
  29.  * Revision 2.4  91/06/25  10:32:47  rpd
  30.  *     Changed WriteVarDecl to WriteUserVarDecl.
  31.  *     Added WriteServerVarDecl.
  32.  *     [91/05/23            rpd]
  33.  * 
  34.  * Revision 2.3  91/02/05  17:56:33  mrt
  35.  *     Changed to new Mach copyright
  36.  *     [91/02/01  17:56:48  mrt]
  37.  * 
  38.  * Revision 2.2  90/06/02  15:06:16  rpd
  39.  *     Created for new IPC.
  40.  *     [90/03/26  21:15:06  rpd]
  41.  * 
  42.  * 07-Apr-89  Richard Draves (rpd) at Carnegie-Mellon University
  43.  *    Extensive revamping.  Added polymorphic arguments.
  44.  *    Allow multiple variable-sized inline arguments in messages.
  45.  *
  46.  * 28-May-87  Richard Draves (rpd) at Carnegie-Mellon University
  47.  *    Created.
  48.  */
  49.  
  50. #ifndef    _UTILS_H
  51. #define    _UTILS_H
  52.  
  53. /* stuff used by more than one of header.c, user.c, server.c */
  54.  
  55. extern void WriteImport(/* FILE *file, string_t filename */);
  56. extern void WriteRCSDecl(/* FILE *file, identifier_t name, string_t rcs */);
  57. extern void WriteBogusDefines(/* FILE *file */);
  58.  
  59. extern void WriteList(/* FILE *file, argument_t *args,
  60.              void (*func)(FILE *file, argument_t *arg),
  61.              u_int mask, char *between, char *after */);
  62.  
  63. extern void WriteReverseList(/* FILE *file, argument_t *args,
  64.                 void (*func)(FILE *file, argument_t *arg),
  65.                 u_int mask, char *between, char *after */);
  66.  
  67. /* good as arguments to WriteList */
  68. extern void WriteNameDecl(/* FILE *file, argument_t *arg */);
  69. extern void WriteUserVarDecl(/* FILE *file, argument_t *arg */);
  70. extern void WriteServerVarDecl(/* FILE *file, argument_t *arg */);
  71. extern void WriteTypeDeclIn(/* FILE *file, argument_t *arg */);
  72. extern void WriteTypeDeclOut(/* FILE *file, argument_t *arg */);
  73. extern void WriteCheckDecl(/* FILE *file, argument_t *arg */);
  74.  
  75. extern char *ReturnTypeStr(/* routine_t *rt */);
  76.  
  77. extern char *FetchUserType(/* ipc_type_t *it */);
  78. extern char *FetchServerType(/* ipc_type_t *it */);
  79. extern void WriteFieldDeclPrim(/* FILE *file, argument_t *arg,
  80.                   char *(*tfunc)(ipc_type_t *it) */);
  81.  
  82. extern void WriteStructDecl(/* FILE *file, argument_t *args,
  83.                    void (*func)(FILE *file, argument_t *arg),
  84.                    u_int mask, char *name */);
  85.  
  86. extern void WriteStaticDecl(/* FILE *file, ipc_type_t *it,
  87.                    boolean_t dealloc, boolean_t longform,
  88.                    boolean_t inname, identifier_t name */);
  89.  
  90. extern void WriteCopyType(/* FILE *file, ipc_type_t *it,
  91.                  char *left, char *right, ... */);
  92.  
  93. extern void WritePackMsgType(/* FILE *file, ipc_type_t *it,
  94.                 boolean_t dealloc, boolean_t longform,
  95.                 boolean_t inname, char *left, char *right,
  96.                 ... */);
  97.  
  98. #endif    _UTILS_H
  99.